package com.my.test.classpath;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Enumeration;
import java.util.Properties;

public class Start1 {

    public static void main(String[] args) {

        Start1 start1 = new Start1();
        ClassLoader classLoader = start1.getClass().getClassLoader();
        URL url = classLoader.getResource("config.properties");
        System.out.println(url.getPath());

        Enumeration<URL> enumeration=null;
        try {
            enumeration = classLoader.getResources("config.properties");

        } catch (IOException e) {
            e.printStackTrace();
        }
        while (enumeration.hasMoreElements()){
            URL url1 = enumeration.nextElement();
            System.out.println(url1.getPath());
        }

    }
}
